package com.jdjw.modules.thirdpost.task;

import com.jdjw.modules.thirdpost.param.ThirdPostInParm;
import com.jdjw.modules.thirdpost.service.*;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration      //主要用于标记配置类，兼备Component的效果。
@EnableScheduling   //开启定时任务
public class ThirdPostScheduleTask {

    //添加定时任务（5秒一次）
    @Scheduled(cron = "00 07 21 * * ?")
    //@Scheduled(cron = "10 10 10 * * ?")  //每天早上10点10分10秒执行一次
    private void configureTasks() {
        //17ok  18no
        ThirdPostInParm tp = new ThirdPostInParm();
        tp.setMethodType("2");
        tp.setStartTime("2021-08-21");
        tp.setEndTime("2021-08-21");
        //工程
        ProjectServiceImpl.doPostProject(tp);//1
        ProjectServiceImpl.doPostProjectContract(tp);//3
        ProjectServiceImpl.doPostProjectTender(tp);//4
        ProjectPayPersonnelServiceImpl.doPostCompany(tp);//5
        ProjectPayPersonnelServiceImpl.doPostPersonnel(tp);//6
        ProjectPayPersonnelServiceImpl.doPostPay(tp);//7
        //三资
        SzZyxzcmxbJiandeServiceImpl.doPostSzZyxzcmxbJiande(tp);//8
        BusAssetApplyParamServiceImpl.doPostCzxx(tp);//9
        BusAssetApplyParamServiceImpl.doPostYs2(tp);//10
        BusAssetApplyParamServiceImpl.doPostSs1(tp);//11
        BusAssetApplyParamServiceImpl.doPostSs2(tp);//12
        LaborEmploymentServiceImpl.doPostLaborEmployment(tp);//13
        MigrantSettlementServiceImpl.doPostMigrantSettlement(tp);//14
        //村级采购
        BusProcureApplyServiceImpl.doPostSZyxzcmxbJiande(tp);//15
        BusProcureApplyServiceImpl.BusZhifu(tp);//16
        BusProcureApplyJudgeServiceImpl.doPostBusProcureZishiqi(tp);//17
        BusProcureApplyServiceImpl.BusCaigouhetong(tp);//18
        BusProcureApplyServiceImpl.BusCaigouleibie(tp);//19
        BusAssetApplyTouBiaoSetviceImpl.doPostSzJiandeershi(tp);//20
        //
        BusWarningResultServiceImpl.doPostSzZyxzWangShang(tp);//21
        BusComplainttwoServiceImpl.doPostBusProcureBanLi(tp);//22
        BusWarningResultServiceImpl.doPostSzJiandeersan(tp);//23
        OfficialSealImpl.doPostofficialseal(tp);//24
        StaEconomicCooperativeImpl.doPoststaEconomicCooperative(tp);//25
        HonestOpinionsImpl.doPosthonestOpinions(tp);//26
        HonestStraightToImpl.doPosthonestStraightTo(tp);//27
        BusComplainttwoServiceImpl.doPostBusProcureApplyZi(tp);//28
        BusComplainttwoServiceImpl.doPostBusProcureErJiu(tp);//29
        BusAssetApplyParamServiceImpl.doPostYs1(tp);//30
        ProjectServiceImpl.doPostProjectCost(tp);//31
    }

}